V83
GIẢI TRÍ-DOWNLOAD-TIỆN ÍCH

Hi,Hãy giới thiệu trang:

vipgiaitri.wap.sh

này tới bạn bè và người thân bạn nhé!


.:๑۩۞۩๑:WAP SẠCH KHÔNG KÍCH HOẠT:๑۩۞۩๑ღ
How to Delete a MySQL Database via the Terminal


First, fire up MySQL in your terminal and login as an administrator account with:


Mã:
mysql -u root -p

You will be prompted for your root password before being granted access to the MySQL monitor.

Now to grab a list of available databases on the system. Running:

Mã:
SHOW DATABASES;
Will result in quite a list of available databases being drawn on the screen (note, it only lists the databases your user account has privileges to see). Once you have located the database you wish to delete in this list we can proceed:

Mã:
DROP DATABASE IF EXISTS mydatabase;
This will now delete the mydatabase database from the MySQL server if it exists. If not, the drop database statement is simply ignored.


Creating a MySql database and username



To create a user account from a MySQL server instance, we need to make use of a CREATE USER call to the mysql.user table.
First, fire up MySQL in your terminal and login as an administrator account with:
Mã:

mysql -u root -p
You will be prompted for your root password before being granted access to the MySQL monitor.
Now to grab a list of available user accounts on the system. Running:
Mã:

SELECT USER,host FROM mysql.USER;
If the user account that you wish to create doesn’t appear in that list, you are good to go. To create a new user account run the following query:
Mã:

CREATE USER 'daivietp'@'localhost' IDENTIFIED BY 'password-for-new-account';
If you omit the @’localhost’ section, the user account will be generated with a host value of ‘%’. If you omit the identified by section, the user account will be created without a password (which is of course quite insecure).
Of course, this user isn’t linked to any databases yet, but this is simple to rectify with a:
Mã:

GRANT ALL ON mydatabase.* TO useraccount@localhost
•thống kê khách

Disneyland 1972 Love the old s